{extend name="admin@public:base" /}
{block name="main-row-content"}
<div class="rows top-button col-sm-12">
     <p>
		<a href="{:url('admin/Sys/front_menu_add')}" class="btn btn-sm btn-warning">
			<i class="ace-icon fa fa-plus "></i>
			添加菜单
		</a>
		<a class="btn btn-sm btn-success margin-left-10 ajaxSortSubmit">
			<i class="ace-icon fa fa-signal  "></i>
			批量排序
		</a>
	</p>
</div>
<div class="row">
	<div class="col-xs-12">
		<!-- PAGE CONTENT BEGINS -->
		<div class="row">
			<div class="col-xs-12">
			  <form class="form-horizontal ajaxSort ajaxForm2" action="{:url('admin/Sys/front_menu_sort')}" method="post">
				<table id="simple-table" class="table table-striped table-bordered table-hover">
					<thead>
						<tr>
							
							<th>ID</th>
							<th>菜单名称</th>
							<th class="hidden-480">URL(可填写三段式或者带http的链接)</th>
							<th class="hidden-480">css图标</th>
                            <th class="hidden-480">显示位置</th>
                            <th>类型</th>
                            <th class="hidden-480">打开方式</th>
                            <th>级别</th>
                            <th class="hidden-480">状态</th>
                            <th class="hidden-480">排序</th>
							<th>操作</th>
						</tr>
					</thead>

					<tbody>
					  {foreach name="menu" item="vo"}
						<tr>
							<td class="center">{$vo.id}</td>
							<td class="hidden-480">{$vo.left}{$vo.title}</td>
							<td class="hidden-480">{$vo.links}</td>
							<td class="hidden-480"><i class="menu-icon fa {$vo.css}" style="font-size:16px"></i></td>
							<td class="hidden-xs hidden-sm">
								<select name="cateid" class="ajax_change_news_cid">
								  <option value="0" {if condition="$vo.place eq 0"}selected{/if} class="bgc">|-顶部</option>
								  <option value="1" {if condition="$vo.place eq 1"}selected{/if} class="bgc">|-尾部</option>
								</select>
								<span class="action" style="display:none">
									<a href="{:url('admin/Sys/front_menu_place')}" class="green change-cid" data-cid="{$vo.place}" data-id="{$vo.id}" title="确认">
										<i class="ace-icon fa fa-check bigger-130"></i>
									</a>
									<a href="javascript:void(0);" class="red cancel-change-cid" data-cid="{$vo.place}" title="取消">
										<i class="ace-icon fa fa-remove bigger-130"></i>
									</a>
								</span>
							</td>	
							<td class="center">{$vo.type?"模块":"外部链接"}</td>
							<td class="hidden-480">{$vo.target=='_blank'?"新窗口打开":"当前窗口打开"}</td>
							<td class="center">{$vo.level}</td>							
                            <td class="hidden-480">
							  	<a href="{:url('admin/Sys/front_menu_status')}" class="ajax_status2" data-id="{$vo.id}">
							  	    <span class="label label-lg {$vo.status? 'label-success' : 'label-warning'}">{$vo.status? '显示' : '隐藏'}</span>
							  	</a>
								
							</td>
							<td><input type="text" name="{$vo.id}" class="input-sm input-40" value="{$vo.sort}"></td>
							<td>
								<div class="hidden-sm hidden-xs btn-group">
									<a href="{:url('admin/Sys/front_menu_add',array('id'=>$vo.id))}" class="btn btn-xs btn-white btn-warning" title="添加菜单">
										<i class="ace-icon fa fa-plus bigger-120"></i>添加菜单
									</a>

									<a href="{:url('admin/Sys/front_menu_edit',array('id'=>$vo.id))}" class="btn btn-xs btn-info btn-white margin-left-10" title="修改菜单">
										<i class="ace-icon fa fa-pencil bigger-120"></i>修改菜单
									</a>

									<a class="btn btn-xs btn-danger btn-white margin-left-10 ajax_del_tz" title="删除菜单" href="{:url('admin/Sys/front_menu_del')}" data-id="{$vo.id}">
										<i class="ace-icon fa fa-trash-o bigger-120"></i>删除菜单
									</a>
								</div>

								<div class="hidden-md hidden-lg">
									<div class="inline pos-rel">
										<button class="btn btn-minier btn-primary dropdown-toggle" data-toggle="dropdown" data-position="auto">
											<i class="ace-icon fa fa-cog icon-only bigger-110"></i>
										</button>

										<ul class="dropdown-menu dropdown-only-icon dropdown-yellow dropdown-menu-right dropdown-caret dropdown-close">
											<li>
												<a href="{:url('admin/Sys/front_menu_add',array('id'=>$vo.id))}" class="tooltip-info" data-rel="tooltip" title="添加菜单">
													<span class="orange">
														<i class="ace-icon fa fa-plus  bigger-120"></i>
													</span>
												</a>
											</li>

											<li>
												<a href="{:url('admin/Sys/front_menu_edit',array('id'=>$vo.id))}" class="tooltip-success" data-rel="tooltip" title="修改菜单">
													<span class="green">
														<i class="ace-icon fa fa-pencil-square-o bigger-120"></i>
													</span>
												</a>
											</li>

											<li>
												<a href="{:url('admin/Sys/front_menu_del')}" data-id="{$vo.id}" class="tooltip-error ajax_del_tz" data-rel="tooltip" title="删除菜单">
													<span class="red">
														<i class="ace-icon fa fa-trash-o bigger-120"></i>
													</span>
												</a>
											</li>
										</ul>
									</div>
								</div>
							</td>
						</tr>
					  {/foreach}
					</tbody>
				</table>
			   </form>
			</div><!-- /.span -->
		</div><!-- /.row -->

		<div class="hr hr-18 dotted hr-double"></div>
	</div><!-- /.col -->
</div><!-- /.row -->
{/block}
   </body>
</html>